<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/commons/taglibs.jsp" %>
<%@ include file="/commons/nocache.jspf" %>
<%@ taglib uri="/FCKeditor" prefix="FCK"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http：//www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http：//www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/form.dwt" codeOutsideHTMLIsLocked="true" -->

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="0">
<script type="text/javascript" src="${ctx}/scripts/datepicker/wpCalendar.js"></script>
<!-- InstanceBeginEditable name="doctitle" -->
<title>开始提案</title>
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="scripts" -->
<script type="text/javascript">
	function submitIt(obj){
		//委员
		<c:if test="${role.roleId == '1'}">
			if(getElementByIdValue("proposalIsGroupSelect") == '1') {
				if(!validateStringNull("联名提案人", "proposalUnionUserName")){
				   return false;
				}
			}
			setElementByIdValue("proposalCondition", getCheckboxCheckedString("proposalPart"));
			
			if(!validateStringNull("案由", "proposalBrief")){
			   return false;
			}
			if(!validateStringNull("提案时间", "proposalSubmitDate")){
			   return false;
			}
		</c:if>
		//工作人员
		<c:if test="${role.roleId == '2'}">
			if(!validateStringNull("届次", "proposalSession")){
			   return false;
			}
			if(!validateStringNull("届次", "proposalCount")){
			   return false;
			}
			if (getElementByIdValue("proposalAduitSuggestSelect") == '0') {
				throwError("审查意见不能为空");
				return false;
			} else if(getElementByIdValue("proposalAduitSuggestSelect") == '1') {
				if(getElementByIdValue("proposalRegisterTypeSelect") == '0') {
					throwError("立案类型不能为空");
					return false;
				}
			} else {
				if(!validateStringNull("审核意见", "proposalAduitSuggest")){
				   return false;
				}
			}
		</c:if>
	 	document.form1.submit();
	}	
	function radioChangeAduitSuggest() {
		var value = getRadioCheckedValue("proposalAduitSuggest");
		if (value == "0") {
			//隐藏立案类型
			displayNone("proposal.type.display");
		} else {
			//展现立案类型
			displayBlock("proposal.type.display");
		}
	}
	function proposalIsGroupSelectChange(obj) {
		if (obj.value == "0") {
			displayNone("proposalUnionUserName");
		} else {
			displayBlock("proposalUnionUserName");
		}
	}
	function proposalAduitSuggestSelectChange(obj) {
		if (obj.value == "1") {
			displayBlock("proposalRegisterTypeSelect.display");
			displayBlock("proposalClassify.display");
		} else {
			displayNone("proposalRegisterTypeSelect.display");
			displayNone("proposalClassify.display");
		}
	}
</script>
<style type="text/css">
.stylebt{ color:#ff0000; font-weight:bold; font-size:26px; }
.stylebt2{ color:#ff0000; font-weight:bold; font-size:14px; }

</style>
<!-- InstanceEndEditable -->
</head>

<body>

<div id="main">
	<div class="zdsz" id="select1">
		<div class="tab">

<!-- InstanceBeginEditable name="tab" -->

<a href="${ctx}/proposal/proposal!index.action"><h3 class="sel" >开始提案</h3></a>
<a href="${ctx}/proposal/proposal!list.action?s_my=${s_my }"><h3>提案查询</h3></a>

<!-- InstanceEndEditable -->
		</div>
		<div class="zd_gut">
			<ul class="block">
				<li>
		
<!-- InstanceBeginEditable name="form" -->

<form name="form1" action="${ctx}/proposal/proposal!create.action" method="post"  enctype="multipart/form-data">
<input type="hidden" id="proposalCondition" name="proposal.proposalCondition" value="${proposal.proposalCondition }"/>
<table width="90%"  border="1" align="center" cellpadding="0" cellspacing="1" bordercolor="#0066cc" >
<tr><td height="50" colspan="6" align="middle"  bgcolor="#FFFFFF" ><span class="stylebt">中国人民政治协商会议吕梁市委员会提案</span></td></tr>
  <tr>
    <td height="30" width="9%" align="right" bgcolor="#DFEAF3"></td>   
    <td height="30" width="9%" align="right" bgcolor="#DFEAF3" class="tblz5"></td> 
    <td  height="30" width="15%" align="middle" bgcolor="#DFEAF3" class="tblz5">委员会
    <input id="proposalSession" name="proposal.proposalSession" value="${proposal.proposalSession }" type="text" size="2" maxLength="2" <c:if test="${role.roleId != '2'}">readOnly style="color:gray;"</c:if>/>届
    <input id="proposalCount" name="proposal.proposalCount" value="${proposal.proposalCount }" type="text" size="2" maxLength="2" <c:if test="${role.roleId != '2'}">readOnly style="color:gray;"</c:if>/>次会议<font color="#ff0000">*</font>
    </td>
    
    
    <td  height="30" width="15%" align="middle" bgcolor="#DFEAF3" class="tblz5">
    <pro:optionValue optionName="proposal.proposalClassify" value="${proposal.proposalClassify}"/>
    类
    <input id="proposalNo" name="proposal.proposalNo" type="text" size="2" value="${proposal.proposalNo }" maxLength="12" <c:if test="${role.roleId != '2'}">readOnly style="color:gray;"</c:if>/>号<font color="#ff0000">*</font>
    </td>
    <td  height="30" width="10%" align="lift" bgcolor="#DFEAF3"></td> 
 <td  height="30" width="10%" align="lift" bgcolor="#DFEAF3" class="tblz5"></td>  
  </tr>
  <tr> <td height="30" colspan="6"  align="lift" bgcolor="#FFFFFF"><span class="stylebt2">提案部分(由委员填写)：</span></td></tr>
  <tr>
 
    <td height="30"  align="right" bgcolor="#DFEAF3">案由：</td>
    <td colspan="5" height="30"  align="left" bgcolor="#DFEAF3" class="tblz5">
    <input id="proposalBrief" name="proposal.proposalBrief" type="text" size="93" value="${proposal.proposalBrief }" maxLength="100" <c:if test="${role.roleId != '1'}">readOnly style="color:gray;"</c:if>/>
    </td>       
  </tr>
  <tr>
    <td height="30"  align="right" bgcolor="#DFEAF3">第一提案人：</td>
    <td height="30"  align="left" bgcolor="#DFEAF3" class="tblz5">
    <input name="textfield22319" type="text" size="20" value="${user.userName }" readOnly style="color:gray;"/></td>
    <td height="30"  align="right" bgcolor="#DFEAF3">界别：</td>
    <td height="30"  align="left" bgcolor="#DFEAF3" class="tblz5">
    <input name="textfield223192" type="text" size="20" value="<pro:optionValue optionName="jieBie" value="${user.jieBie}"/>" readOnly style="color:gray;"/></td>
    <td height="30"  align="right" bgcolor="#DFEAF3">提案单位名称：</td>
    <td height="30"  align="left" bgcolor="#DFEAF3" class="tblz5">
    <input name="textfield223193" type="text" size="20" value="${user.workUnit }" readOnly style="color:gray;"/></td>
  </tr>
  <tr>
    <td height="30"   align="right" bgcolor="#DFEAF3">负责人：</td>
    <td height="30"   align="left" bgcolor="#DFEAF3" class="tblz5">
    <input id="proposalPrincipal" name="proposal.proposalPrincipal" value="${proposal.proposalPrincipal }" type="text" size="20" maxLength="20" <c:if test="${role.roleId != '1'}">readOnly style="color:gray;"</c:if>/></td>
    <td height="30"   align="right" bgcolor="#DFEAF3">联系电话：</td>
    <td height="30"   align="left" bgcolor="#DFEAF3" class="tblz5">
    <input name="textfield2231922" type="text" size="20" value="${user.userPhone }" readOnly style="color:gray;"/></td>
    <td height="30"   align="right" bgcolor="#DFEAF3">E-mail：</td>
    <td height="30"   align="left" bgcolor="#DFEAF3" class="tblz5">
    <input name="textfield2231933" type="text" size="20" value="${user.userEmail }" readOnly style="color:gray;"/></td>
  </tr>
    <tr>
    <td height="30"   align="right" bgcolor="#DFEAF3">联名提案：</td>
    <td height="30"   align="left" bgcolor="#DFEAF3" class="tblz5">
    <c:if test="${role.roleId == '1'}">
    <pro:option id="proposalIsGroupSelect" selectName="proposal.proposalIsGroupSelect" optionName="proposal.proposalIsGroupSelect" value="${proposal.proposalIsGroupSelect}" onchange="proposalIsGroupSelectChange(this)"/>
    </c:if>
    <c:if test="${role.roleId != '1'}">
    	<pro:optionValue optionName="proposal.proposalIsGroupSelect" value="${proposal.proposalIsGroupSelect}"/>
    	<input type="hidden" name="proposal.proposalIsGroupSelect" value="${proposal.proposalIsGroupSelect }"/>
    </c:if>
    </td>
    <td height="30"   align="right" bgcolor="#DFEAF3">提案时间：</td>
    <td height="30"   align="left" bgcolor="#DFEAF3" class="tblz5">
    <input id="proposalSubmitDate" name="proposal.proposalSubmitDate" type="text" readOnly style="color:gray;" class="input01" maxlength="20" value="<s:date name="proposal.proposalSubmitDate" format="yyyy-MM-dd"/>"/>
    <c:if test="${role.roleId == ROLE_COMMITTEE}">
    <img src="${ctx}/images/main/calendar.gif" align="absmiddle" border="0" style="cursor:hand" onclick="showCalendar(this,document.getElementById('proposalSubmitDate'));" />
    </c:if>
    </td>
    <td height="30"   align="right" bgcolor="#DFEAF3">邮编：</td>
    <td height="30"   align="left" bgcolor="#DFEAF3" class="tblz5">
    <input name="textfield2231933" type="text" size="20" value="${user.zipCode }" readOnly style="color:gray;"/></td>   
  </tr>
    <tr>
    <td height="30"   align="right" bgcolor="#DFEAF3">通讯地址：</td>
    <td colspan="3"   height="30"   align="left" bgcolor="#DFEAF3" class="tblz5">
    <input name="textfield232" type="text" size="93" value="${user.address }" readOnly style="color:gray;"/></td>
    <td height="30"   align="right" bgcolor="#DFEAF3">满意度：</td>
    <td height="30"   align="left" bgcolor="#DFEAF3" class="tblz5">
    <c:if test="${role.roleId == '1' && proposal.proposalSatisfy == '6'}">
    	<pro:option selectName="proposal.proposalSatisfy" optionName="proposal.proposalSatisfy" value="${proposal.proposalSatisfy}"/>
    </c:if>
    <c:if test="${role.roleId != '1'}">
    	<pro:optionValue optionName="proposal.proposalSatisfy" value="${proposal.proposalSatisfy}"/>
    	<input type="hidden" name="proposal.proposalSatisfy" value="${proposal.proposalSatisfy }"/>
    </c:if>
    </td>    
  </tr>
  <tr>
    <td height="30"   align="right" bgcolor="#DFEAF3">联名提案人：</td>
    <td colspan="3" height="30"   align="left" bgcolor="#DFEAF3" class="tblz5">
    <input id="proposalUnionUserName" name="proposal.proposalUnionUserName" value="${proposal.proposalUnionUserName}" type="text" size="90" maxLength="100" style="display:none;"/></td>
    <td height="30" colspan="3"   align="lift" bgcolor="#DFEAF3">(请用逗号分隔开提案人)</td>
  </tr>
  <tr>
    <td  height="30"   align="right" bgcolor="#DFEAF3">1.&nbsp;&nbsp;&nbsp;</td>
    <td colspan="5" height="30"   align="lift" bgcolor="#DFEAF3">如有以下情况，请在
    <label>
    <input type="checkbox" name="proposalPart" value="0" />
        内打√注明（未注明的视为“否”）：</label></td>
  </tr>
  <tr>
  <td  height="30"   align="right" bgcolor="#DFEAF3">（1）</td>
    <td colspan="5" height="30"   align="lift" bgcolor="#DFEAF3">
    希望承办单位在办理过程中加强与提案人联系沟通<input type="checkbox" name="proposalPart" value="1" <c:if test="${role.roleId != '1'}">disabled</c:if>/></td>
  </tr>
  <tr>
  <td  height="30"   align="right" bgcolor="#DFEAF3">（2）</td>
    <td colspan="5" height="30"   align="lift" bgcolor="#DFEAF3">
    此提案请承办单位在工作中研究参考，不需要书面答复<input type="checkbox" name="proposalPart" value="2" <c:if test="${role.roleId != '1'}">disabled</c:if>/></td>
  </tr>
  <tr>
    <td height="30"   align="right" bgcolor="#DFEAF3">（3）</td>
    <td height="30"   align="lift" bgcolor="#DFEAF3"><input type="checkbox" name="proposalPart" value="3" <c:if test="${role.roleId != '1'}">disabled</c:if>/>
同意公开发表</td>
    <td height="30"   align="lift" bgcolor="#DFEAF3"><input type="checkbox" name="proposalPart" value="4" <c:if test="${role.roleId != '1'}">disabled</c:if>/>
      经过调研</td>
    <td height="30"   align="lift" bgcolor="#DFEAF3"><input type="checkbox" name="proposalPart" value="5" <c:if test="${role.roleId != '1'}">disabled</c:if>/>
      本人撰写</td>
    <td height="30"   align="lift" bgcolor="#DFEAF3"><input type="checkbox" name="proposalPart" value="6" <c:if test="${role.roleId != '1'}">disabled</c:if>/>
      他人代写</td>
    <td height="30"   align="lift" bgcolor="#DFEAF3">&nbsp;</td>
  </tr>
  <tr>
    <td height="30"   align="lift" bgcolor="#DFEAF3">&nbsp;</td>
    <td height="30"   align="lift" bgcolor="#DFEAF3"><input type="checkbox" name="proposalPart" value="7" <c:if test="${role.roleId != '1'}">disabled</c:if>/>
      他人委托</td>
    <td height="30"   align="lift" bgcolor="#DFEAF3"><input type="checkbox" name="proposalPart" value="8" <c:if test="${role.roleId != '1'}">disabled</c:if>/>
      第一次提出</td>
    <td height="30"   align="lift" bgcolor="#DFEAF3"><input type="checkbox" name="proposalPart" value="9" <c:if test="${role.roleId != '1'}">disabled</c:if>/>
      多次提出</td>
    <td height="30"   align="lift" bgcolor="#DFEAF3">&nbsp;</td>
    <td height="30"   align="lift" bgcolor="#DFEAF3">&nbsp;</td>
  </tr>

 <tr> <td height="30" colspan="6"  align="lift" bgcolor="#FFFFFF"><span class="stylebt2">提案内容（委员填写）：</span></td></tr>
  <tr>
    <td colspan="6" height="30"   align="middle" bgcolor="#DFEAF3" class="tblz5">
	    <FCK:editor id="proposal.proposalContent" basePath="${ctx}/fckeditor/" width="100%" height="300px" 
	    skinPath="${ctx}/fckeditor/editor/skins/office2003/"  toolbarSet="Default" >
	    ${proposal.proposalContent }
	</FCK:editor>
	</td>
  </tr>
  <tr>
    <td height="30"   align="right" bgcolor="#DFEAF3">上传附件：</td>
    <td height="30"   align="left" bgcolor="#DFEAF3" class="tblz5">
    <c:if test="${role.roleId == '1'}">
    <input id="annex"  name="annex" type="file" class="multi" maxlength="10"  ContentEditable="false"/>
    </c:if></td>
    <td colspan="4" height="30"   align="left" bgcolor="#DFEAF3" class="tblz5">内容较多时可另附文档。</td>
  </tr>
  <tr>
    <td height="30"  align="middle" bgcolor="#DFEAF3">案件状态：</td>
    <td colspan="6" height="30"   align="left" bgcolor="#DFEAF3" class="tblz5">
    </td>
  </tr>
  <tr> <td height="30" colspan="6"  align="lift" bgcolor="#FFFFFF"><span class="stylebt2">提案答复（承办单位）：</span></td></tr>
  <tr>
    <td colspan="6" height="30"   align="middle" bgcolor="#DFEAF3" class="tblz5">
    <textarea name="proposal.proposalAnswer" cols="150" rows="6" onpropertychange="if(value.length>500) value=value.substr(0,500)" <c:if test="${role.roleId != '3' || proposal.proposalStatus != PROPOSAL_TAKETO_DEPT_SUBMIT}">readOnly style="color:gray;"</c:if>>${proposal.proposalAnswer}</textarea></td>
  </tr>
 
</table>

<!-- InstanceEndEditable -->
<font color="red"><div id="ERROR">${ERROR }</div></font>
<table  width="100" height="50" border="0" align="center" cellpadding="0" cellspacing="1" >
    <tr>
<!-- InstanceBeginEditable name="button" -->
      <td width="150" align="right"><input type="button"  onclick="submitIt(this);"  value="提交" class="btn"/></td>
      <td width="100" align="right"><input type="reset" value="重置" class="btn"/></td>
<!-- InstanceEndEditable --> 
	</tr>
</table>
</from>
</li>
		</ul>
	  </div>
	</div>
</div>
</body>
<!-- InstanceEnd --></html>
